<?php
class welcomeModel extends CI_Model{
	
	function __construct(){
		parent::__construct();
	}
	
	function check_save_text($comment_original){
		$this->db->insert('comments', array(
                'comment_set_id'        =>  2993,
                'comment_user_id'       =>  40,
                'comment_original'      =>  $comment_original,
                'comment_enabled'       =>  1,
                'comment_is_spam'       =>  0,
                'comment_time_added'    =>  1358090826,
                'comment_time_updated'  =>  1358090826
            ));

            return $this->db->last_query();
	}
	
	function get_data(){
		$this->db->select('comment_original');
		$this->db->from('comments');
		$this->db->where('comment_id', 46);
		
		$query = $this -> db -> get();
			
		if ($query -> num_rows() > 0){
			return $query->result();
		}else{
			return false;
		}
	}
}